Klasse Modification

java.lang.Object
com.inet.pdfc.generator.model.Modification
Alle implementierten Schnittstellen:
Serializable

@JsonData public class Modification extends Object implements Serializable
A Modification is the smallest change description in the differences model of i-net PDFC. It contains a set of subsequent elements which were all modified in the same manner and thus are of the same basic ElementType. 'Subsequent' refers here to left-to-right top-down order which i-net PDFC assumes as reading order. This order might by modified by filter (e.G. the 'multi column' filter), so please mind that this 'reading order' is not necessarily a strict Y-X order!
A modification can span several lines or whole pages. It's only restricted by another modification or a set of matched elements.
Seit:
3.0
Siehe auch:
  • Konstruktordetails

  • Methodendetails

    • setShouldMerge

      public void setShouldMerge(boolean shouldMerge)
      A flag, for merge the pageElements to one elements
      Parameter:
      shouldMerge - true for merge all pageElements, otherwise false
      Seit:
      4.3
    • isShouldPageElementMerge

      public boolean isShouldPageElementMerge()
      A flag, for merge the pageElements to one elements
      Gibt zurück:
      true for merge all pageElements, otherwise false
      Seit:
      4.3
    • getModificationType

      public Modification.ModificationType getModificationType()
      Returns the type of modification described by this instance
      Gibt zurück:
      the type of modification described by this instance
      Seit:
      3.0
      Siehe auch:
    • getDifferencePages

      public DifferencePages getDifferencePages(boolean first)
      Return the difference pageNumbers or null if no elements exist for this document
      Parameter:
      first - true for the first document, false
      Gibt zurück:
      the difference pageNumbers
      Seit:
      4.0
    • getSourceType

      public DiffGroup.GroupType getSourceType()
      Returns DiffGroup.GroupType of the DiffGroup which contains this Modification
      Gibt zurück:
      DiffGroup.GroupType of the DiffGroup which contains this Modification
      Seit:
      3.0
      Siehe auch:
    • getAffectedElements

      public @Nonnull List<com.inet.pdfc.model.PagedElement> getAffectedElements(boolean first)
      Returns a list of element, affected by this modification in either document
      Parameter:
      first - true to get the effected element in the first document, false for the second document
      Gibt zurück:
      a list of affected elements, never null but may be empty
      Seit:
      3.0
    • getContentType

      public com.inet.pdfc.model.ElementType getContentType()
      Returns the base type of the elements in this modification. This type can be used as a guideline for the formatter of this modification.
      As a general contract: all effected elements fulfill the condition '
      Gibt zurück:
      the base element type of this modification.
      Seit:
      3.0
    • getAttributeDifferences

      public List<AttributeDifference<?>> getAttributeDifferences()
      Returns a list of changes which was applied to all affected elements. This method will only return a list if the Modification.ModificationType is Modification.ModificationType.attributeDifference, otherwise it will return null.
      NOTE: Each differnces in the returned list is of a different class. Please have a loot at the com.inet.pdfc.generator.model.diff package for all available types.
      Gibt zurück:
      the changes made to the elements, may be null
      Seit:
      3.0
    • getAttributeDifference

      public <T extends AttributeDifference<?>> @Nullable T getAttributeDifference(Class<T> type)
      Returns a certain tyoe of changes which was applied to all affected elements. This method will only return a AttributeDifference if the Modification.ModificationType is Modification.ModificationType.attributeDifference and there is a change of exactly that type, otherwise it will return null.
      Typparameter:
      T - the actual difference implementation type
      Parameter:
      type - the exact type of the AttributeDifference to get
      Gibt zurück:
      the change made to the elements, may be null
      Seit:
      3.0
    • getMessage

      public @Nonnull String getMessage()
      Returns a log message which describes this modification. The message will be localized using the default Locale.
      This message is meant for convenience and is equal to
      new ModificationFormatter().format( this )
      Gibt zurück:
      a localized modification message
      Seit:
      3.0
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object
    • isVisible

      public boolean isVisible()
      Returns whether or not this difference will be displayed in any rendered output. This flag is an addition to the visibility of the different DiffGroup.GroupTypes to allow to hide distinct differences.
      Gibt zurück:
      true if the difference is to be rendered, false if the difference must not be shown in any graphical output
      Seit:
      20.04
    • setVisible

      public void setVisible(boolean visible)
      Defines whether or not this difference will be displayed in any rendered output. This flag is an addition to the visibility of the different DiffGroup.GroupTypes to allow to hide distinct differences.
      Parameter:
      visible - true if the difference is to be rendered, false if the difference must not be shown in any graphical output
      Seit:
      20.04